from PySide6.QtWidgets import QMainWindow,QLabel
from views.home.home import Ui_home
from views.schoolInfo.schoolinfoView import SchoolInfoView
from views.initsetting.initsettingView import InitSettingView
from views.person.personbase.personBaseView import PersonBaseInfoView
from views.person.other.otherView import OtherView
from views.person.persontype.persontypeView import PersonTypeView
from views.bankinfo.bankcard.bankcardView import BankCardView
from views.transactiondetails.tansactiondetailsView import TansactionDetailsView
from views.bankinfo.bankinfo.bankinfoView import BankAccountView
from views.person.surepersontype.surepersontypeView import SurePersonTypeView
from views.issuedmange.sureissuedperson.issuedmangeView import IssuedMangeView
from views.issuedmange.printmaterial.printmaterialView import PrintmateriaView

from views.showpdf.showpdfdialogView import ShoePDFView

class HomeViews(QMainWindow):

    def __init__(self):
        super().__init__()
        self.ui = Ui_home()
        self.ui.setupUi(self)
        self.ui.showpdf.clicked.connect(self.showpdffun)

        self.ui.statusbar.addWidget(QLabel('本程序由胡荣江独立开发，版权归胡荣江所有！版本号为V1'))

    def showpdffun(self):
        ShoePDFView(r'C:\Users\huron\Desktop\新版人教版语文三年级上册活页默写.pdf').exec()
    # 学校信息
    def schoolInfoWidget(self):
        self.setCentralWidget(SchoolInfoView())
    # 初始化设置
    def initsettingWidget(self):
        initsetting = InitSettingView()
        initsetting.exec()

    def pesonTypeWidget(self):
        self.setCentralWidget(PersonTypeView())

    # 人员基本信息
    def personBaseInfoWidget(self):
        self.setCentralWidget(PersonBaseInfoView())

    # 人员基本信息
    def otherWidget(self):
        self.setCentralWidget(OtherView())

    # 银行卡信息
    def bankinfoWidget(self):
        self.setCentralWidget(BankCardView())
    # 银行账户信息
    def bankaccountWidget(self):
        self.setCentralWidget(BankAccountView())



    def tansactiondetailsWidget(self):
        self.setCentralWidget(TansactionDetailsView())

    # 人员类型
    def suerperontypeWidget(self):
        self.setCentralWidget(SurePersonTypeView())

    # 发放人员确定
    def suerpersonWidget(self):
        self.setCentralWidget(IssuedMangeView())

    # 打印人员
    def lssuelistWidget(self):
        self.setCentralWidget(PrintmateriaView())